package org.anti996.bankms.controller;

import org.anti996.bankms.util.IOUtil;
import org.anti996.bankms.view.HomeView;

public class HomeController extends ControllerBase {

    public HomeController() {
        super(new HomeView());
    }

    @Override
    public void deal() {
        super.deal();
        int order = IOUtil.parseOrder();
        switch (order) {
            case 1 -> Navigator.push(new AdminController());
            case 2 -> Navigator.push(new UserController());
            case 3 -> Navigator.pop();
            default -> wrongInputAndRetry();
        }
    }
}
